#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>
#include <string.h>
#include <stdlib.h>
#include "Stack.h"
#include "cal.h"


int main()
{
	int i = 0;
	int input_num = 0;
	OPTR optr_satck;
	stack_BiTree bitree_stack;
	Stack_Init_OPTR(&optr_satck);
	Stack_Init_BiTree(&bitree_stack);
	Stack_Push_OPTR(&optr_satck,'#');
	BiTree* forest = ExpTree_Init(&optr_satck, &bitree_stack,&input_num);
	for(i = 0;i <= input_num;i++)
	{
		int result = EvaluateExpTree(forest[i]);
		printf("%d\n", result);
	}
	return 0;
}